#ifndef _SUPER_MEGA_LINE_H_
#define _SUPER_MEGA_LINE_H_

#include "point.h" 

namespace Samsung
{
	class Line
	{
	public:
		Line(const Point& start, const Point& finish)
			: start_(start), finish_(finish)
		{}
		bool operator ==(const Line& l)
		{
			return
				(((l.start_ == start_)
				&& (l.finish_ == finish_))
				|| ((l.finish_ == start_) && (l.start_ == finish_)));
		}
		bool IsIncludePoint(const Point& p)
		{
			if ((p.first_ == start_.first_) && (finish_.first_ == p.first_))
			{
				return (((p.second_ >= start_.second_) && (p.second_ <= finish_.second_)) ||
					((p.second_ <= start_.second_) && (p.second_ >= finish_.second_)));
			}
			if ((p.second_ == start_.second_) && (p.second_ == finish_.second_))
			{
				return (((p.first_ >= start_.first_) && (p.first_ <= finish_.first_)) ||
					((p.first_ <= start_.first_) && (p.first_ >= finish_.first_)));
			}
			return false;
		}
	private:
		Point start_;
		Point finish_;
	};
}

#endif